
<?php
/**
 * @Entity
 * @Table(name="order_pizza")
 */

class OrderPizza {



	/**
	 * @Id
	 * @Column(name="pizza_name", type="string", length=50, nullable=false)
	 */
	private $pizzaName;

	/**
	 * @Id
	 * @Column(name="topping_name", type="string", length=50, nullable=false)
	 */
	private $toppingName;

	/**
	 * @Column(name="quantity", type="integer", length=11, nullable=false)
	 */
	private $quantity;

	/**
	 * @Column(name="position", type="integer", length=11, nullable=false)
	 */
	private $position;

	function OrderPizza($orderPizza){
		$this->setPizzaName($orderPizza["pizza_name"]);
		$this->setToppingName($orderPizza["topping_name"]);
		$this->setQuantity($orderPizza["quantity"]);
		$this->setPosition($orderPizza["position"]);
	}

	public function getPizzaName() 
	{
		return $this->pizzaName;
	} 

	public function setPizzaName($pizzaName) 
	{
		$this->pizzaName = $pizzaName;
	} 

	public function getToppingName() 
	{
		return $this->toppingName;
	} 

	public function setToppingName($toppingName) 
	{
		$this->toppingName = $toppingName;
	} 

	public function getQuantity() 
	{
		return $this->quantity;
	} 

	public function setQuantity($quantity) 
	{
		$this->quantity = $quantity;
	} 

	public function getPosition() 
	{
		return $this->position;
	} 

	public function setPosition($position) 
	{
		$this->position = $position;
	} 

	public static function dbGetOrderPizzas($where){
		return dbGet("OrderPizza", "order_pizza", $where);
	}
}
?>
